﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class workPlan : System.Web.UI.Page
{
    private static string  oId = null;
    private SOAWebService.Service1 ser = new SOAWebService.Service1();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["orderId"] != null)
            {
                oId = Session["orderId"].ToString();
            }
            else
            {
                Response.Redirect("GetOrderInfo.aspx");
            }
            //try
            //{
            //    oId = Request.QueryString["oId"].ToString();
            //}
            //catch (Exception ee)
            //{
            //    Response.Write("<script>alert('请填写订单！');history.back();</script>");
            //    Response.Redirect("GetOrderInfo.aspx");
            //}
            BindData();
        }
    }
    public void BindData()
    {
        GridView1.DataSource = ser.GetworkplanById(oId);
        GridView1.DataBind();
    }
    //protected void btn1_Click(object sender, EventArgs e)
    //{


    //    GridView1.DataSource = ser.GetworkplanById(txt1.Text);
    //    GridView1.DataBind();
    //}
}
